/*
 Navicat Premium Dump SQL

 Source Server         : 127.0.0.1
 Source Server Type    : MySQL
 Source Server Version : 50744 (5.7.44)
 Source Host           : 127.0.0.1:3306
 Source Schema         : smart_community

 Target Server Type    : MySQL
 Target Server Version : 50744 (5.7.44)
 File Encoding         : 65001

 Date: 26/08/2025 16:12:20
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for sc_repair_order
-- ----------------------------
DROP TABLE IF EXISTS `sc_repair_order`;
CREATE TABLE `sc_repair_order` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'å·¥å•ID',
  `order_no` varchar(50) NOT NULL COMMENT 'å·¥å•å·',
  `user_id` bigint(20) NOT NULL COMMENT '申请人 ID',
  `community_id` bigint(20) NOT NULL COMMENT 'ç¤¾åŒºID',
  `repair_type` tinyint(4) NOT NULL COMMENT 'ç»´ä¿®ç±»åž‹ï¼š1-æ°´ç”µï¼Œ2-é—¨çª—ï¼Œ3-ç”µæ¢¯ï¼Œ4-ç©ºè°ƒï¼Œ5-å…¶ä»–',
  `title` varchar(200) NOT NULL COMMENT 'ç»´ä¿®æ ‡é¢˜',
  `description` text COMMENT 'é—®é¢˜æè¿°',
  `repair_address` varchar(255) DEFAULT NULL COMMENT '维修地址',
  `contact_phone` varchar(20) DEFAULT NULL COMMENT 'è”ç³»ç”µè¯',
  `urgency_level` tinyint(4) DEFAULT '2' COMMENT '紧急程度：1 - 紧急，2 - 一般，3 - 不紧急',
  `status` tinyint(4) DEFAULT '1' COMMENT '状态：1 - 待受理，2 - 已受理，3 - 维修中，4 - 已完成，5 - 已取消',
  `assign_to` bigint(20) DEFAULT NULL COMMENT '分配给 (维修人员 ID)',
  `assign_time` datetime DEFAULT NULL COMMENT '分配时间',
  `complete_time` datetime DEFAULT NULL COMMENT '完成时间',
  `satisfaction` tinyint(4) DEFAULT NULL COMMENT '满意度评分 (1-5 分)',
  `resident_id` bigint(20) DEFAULT NULL COMMENT '居民 ID',
  `location` varchar(2048) DEFAULT NULL COMMENT '图片URL，使用英文逗号(,)分隔',
  `priority` tinyint(4) DEFAULT '2' COMMENT '优先级',
  `create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_by` bigint(20) DEFAULT NULL COMMENT '更新人',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `deleted` tinyint(1) DEFAULT '0' COMMENT '是否删除：0-否，1-是',
  `version` int(11) DEFAULT '1' COMMENT '版本号',
  PRIMARY KEY (`id`),
  UNIQUE KEY `order_no` (`order_no`),
  KEY `idx_order_no` (`order_no`),
  KEY `idx_user_id` (`user_id`),
  KEY `idx_status` (`status`),
  KEY `idx_repair_order_composite` (`community_id`,`status`,`create_time`),
  KEY `idx_repair_order_user_status` (`user_id`,`status`),
  KEY `idx_repair_order_update_by` (`update_by`),
  KEY `idx_repair_order_update_time` (`update_time`),
  KEY `idx_repair_order_priority` (`repair_type`,`status`,`create_time`),
  KEY `idx_repair_order_create_time` (`create_time`),
  KEY `idx_repair_order_community_status` (`community_id`,`status`),
  KEY `idx_repair_order_type` (`repair_type`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb4 COMMENT='ç»´ä¿®å·¥å•è¡¨';

-- ----------------------------
-- Records of sc_repair_order
-- ----------------------------
BEGIN;
INSERT INTO `sc_repair_order` (`id`, `order_no`, `user_id`, `community_id`, `repair_type`, `title`, `description`, `repair_address`, `contact_phone`, `urgency_level`, `status`, `assign_to`, `assign_time`, `complete_time`, `satisfaction`, `resident_id`, `location`, `priority`, `create_by`, `create_time`, `update_by`, `update_time`, `deleted`, `version`) VALUES (1, 'RO202501001', 1, 1, 1, '', 'æ°´ç®¡æ¼æ°´', NULL, '13800138001', 2, 5, NULL, NULL, NULL, NULL, 1, '1å·æ¥¼101å®¤', 2, NULL, '2025-06-26 02:36:06', 1, '2025-07-17 04:17:59', 0, 1);
INSERT INTO `sc_repair_order` (`id`, `order_no`, `user_id`, `community_id`, `repair_type`, `title`, `description`, `repair_address`, `contact_phone`, `urgency_level`, `status`, `assign_to`, `assign_time`, `complete_time`, `satisfaction`, `resident_id`, `location`, `priority`, `create_by`, `create_time`, `update_by`, `update_time`, `deleted`, `version`) VALUES (2, 'RO202501002', 1, 2, 2, '', 'ç”µè·¯æ•…éšœ', NULL, '13800138002', 2, 4, 1, '2025-07-17 12:16:14', NULL, NULL, 2, '2å·æ¥¼202å®¤', 1, NULL, '2025-06-26 02:36:06', 1, '2025-07-17 04:17:35', 0, 1);
INSERT INTO `sc_repair_order` (`id`, `order_no`, `user_id`, `community_id`, `repair_type`, `title`, `description`, `repair_address`, `contact_phone`, `urgency_level`, `status`, `assign_to`, `assign_time`, `complete_time`, `satisfaction`, `resident_id`, `location`, `priority`, `create_by`, `create_time`, `update_by`, `update_time`, `deleted`, `version`) VALUES (3, 'RO202501003', 1, 3, 3, '', 'ç”µæ¢¯æ•…éšœ', NULL, '13800138003', 2, 4, 6, '2025-07-17 11:01:40', NULL, NULL, 3, '3å·æ¥¼ç”µæ¢¯', 1, NULL, '2025-06-26 02:36:06', 9, '2025-07-17 05:16:21', 0, 1);
INSERT INTO `sc_repair_order` (`id`, `order_no`, `user_id`, `community_id`, `repair_type`, `title`, `description`, `repair_address`, `contact_phone`, `urgency_level`, `status`, `assign_to`, `assign_time`, `complete_time`, `satisfaction`, `resident_id`, `location`, `priority`, `create_by`, `create_time`, `update_by`, `update_time`, `deleted`, `version`) VALUES (4, 'RO20250714150146334859', 9, 5, 4, '超山脚下配电箱维修', '超山脚下东边1号配电箱门被人卸下来了', '超山脚下东边1号配电箱', '13567114714', 2, 4, 1, '2025-07-16 19:39:12', NULL, NULL, NULL, NULL, 2, NULL, '2025-07-14 15:01:46', 9, '2025-07-17 05:25:16', 0, 1);
INSERT INTO `sc_repair_order` (`id`, `order_no`, `user_id`, `community_id`, `repair_type`, `title`, `description`, `repair_address`, `contact_phone`, `urgency_level`, `status`, `assign_to`, `assign_time`, `complete_time`, `satisfaction`, `resident_id`, `location`, `priority`, `create_by`, `create_time`, `update_by`, `update_time`, `deleted`, `version`) VALUES (5, 'RO20250717122104866840', 1, 4, 1, '空调维修', '空调一点也不冷，需要修理', '皮匠弄7-2-501', '13567114714', 2, 4, 1, '2025-07-17 12:21:21', NULL, NULL, NULL, NULL, 2, NULL, '2025-07-17 12:21:04', 1, '2025-07-17 04:29:38', 0, 1);
INSERT INTO `sc_repair_order` (`id`, `order_no`, `user_id`, `community_id`, `repair_type`, `title`, `description`, `repair_address`, `contact_phone`, `urgency_level`, `status`, `assign_to`, `assign_time`, `complete_time`, `satisfaction`, `resident_id`, `location`, `priority`, `create_by`, `create_time`, `update_by`, `update_time`, `deleted`, `version`) VALUES (6, 'RO20250717123041492791', 1, 4, 1, '空调又坏了', '反正就一直坏，是不是质量问题？', '皮匠弄7-2-501', '13567114714', 2, 4, 1, '2025-07-17 12:31:04', NULL, NULL, NULL, NULL, 2, NULL, '2025-07-17 12:30:42', 1, '2025-07-17 05:14:56', 0, 1);
INSERT INTO `sc_repair_order` (`id`, `order_no`, `user_id`, `community_id`, `repair_type`, `title`, `description`, `repair_address`, `contact_phone`, `urgency_level`, `status`, `assign_to`, `assign_time`, `complete_time`, `satisfaction`, `resident_id`, `location`, `priority`, `create_by`, `create_time`, `update_by`, `update_time`, `deleted`, `version`) VALUES (7, 'RO20250717131734531849', 9, 5, 1, '下水道堵了', '下水道堵了下水道堵了下水道堵了下水道堵了', '二小区14-1-401', '13567114741', 2, 4, 6, '2025-07-17 13:17:47', NULL, NULL, NULL, NULL, 2, NULL, '2025-07-17 13:17:35', 9, '2025-07-17 05:18:23', 0, 1);
INSERT INTO `sc_repair_order` (`id`, `order_no`, `user_id`, `community_id`, `repair_type`, `title`, `description`, `repair_address`, `contact_phone`, `urgency_level`, `status`, `assign_to`, `assign_time`, `complete_time`, `satisfaction`, `resident_id`, `location`, `priority`, `create_by`, `create_time`, `update_by`, `update_time`, `deleted`, `version`) VALUES (8, 'RO20250717133859258057', 9, 3, 3, '电梯坏了', '一小区48-2-601，电梯坏了', '一小区48-2-601', '18329188884', 2, 4, 7, '2025-07-17 13:39:23', '2025-07-17 13:43:22', 1, NULL, NULL, 2, NULL, '2025-07-17 13:38:59', 9, '2025-07-17 05:43:22', 0, 1);
INSERT INTO `sc_repair_order` (`id`, `order_no`, `user_id`, `community_id`, `repair_type`, `title`, `description`, `repair_address`, `contact_phone`, `urgency_level`, `status`, `assign_to`, `assign_time`, `complete_time`, `satisfaction`, `resident_id`, `location`, `priority`, `create_by`, `create_time`, `update_by`, `update_time`, `deleted`, `version`) VALUES (9, 'RO20250717135629403071', 9, 3, 3, '电梯坏了', '电梯坏了电梯坏了电梯坏了电梯坏了', '12-1-501', '13567114714', 2, 4, 9, '2025-07-17 13:56:41', '2025-07-17 14:01:20', 3, NULL, NULL, 2, NULL, '2025-07-17 13:56:30', 9, '2025-07-17 06:01:19', 0, 1);
INSERT INTO `sc_repair_order` (`id`, `order_no`, `user_id`, `community_id`, `repair_type`, `title`, `description`, `repair_address`, `contact_phone`, `urgency_level`, `status`, `assign_to`, `assign_time`, `complete_time`, `satisfaction`, `resident_id`, `location`, `priority`, `create_by`, `create_time`, `update_by`, `update_time`, `deleted`, `version`) VALUES (10, 'RO20250728114013143934', 9, 5, 1, '水电维修水电维修', '水电维修水电维修水电维修水电维修', '水电维修水电维修水电维修水电维修水电维修水电维修', '13569874545', 1, 3, 30, '2025-07-28 11:40:48', NULL, NULL, NULL, NULL, 2, NULL, '2025-07-28 11:40:14', 9, '2025-07-28 03:45:35', 0, 1);
INSERT INTO `sc_repair_order` (`id`, `order_no`, `user_id`, `community_id`, `repair_type`, `title`, `description`, `repair_address`, `contact_phone`, `urgency_level`, `status`, `assign_to`, `assign_time`, `complete_time`, `satisfaction`, `resident_id`, `location`, `priority`, `create_by`, `create_time`, `update_by`, `update_time`, `deleted`, `version`) VALUES (11, 'RO20250808150906755493', 9, 5, 2, '浙江省杭州市临平区塘栖镇超山小区001栋1单元102号', '浙江省杭州市临平区塘栖镇超山小区001栋1单元102号', '浙江省杭州市临平区塘栖镇超山小区001栋1单元102号', '13567458548', 2, 1, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, '2025-08-08 15:09:06', NULL, '2025-08-08 15:09:06', 0, 1);
INSERT INTO `sc_repair_order` (`id`, `order_no`, `user_id`, `community_id`, `repair_type`, `title`, `description`, `repair_address`, `contact_phone`, `urgency_level`, `status`, `assign_to`, `assign_time`, `complete_time`, `satisfaction`, `resident_id`, `location`, `priority`, `create_by`, `create_time`, `update_by`, `update_time`, `deleted`, `version`) VALUES (12, 'RO20250811171820713731', 9, 5, 1, '浙江省杭州市临平区塘栖镇超山小区001栋1单元102号', '浙江省杭州市临平区塘栖镇超山小区001栋1单元102号', '浙江省杭州市临平区塘栖镇超山小区001栋1单元102号', '18329188728', 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, '2025-08-11 17:18:21', NULL, '2025-08-11 17:18:21', 0, 1);
INSERT INTO `sc_repair_order` (`id`, `order_no`, `user_id`, `community_id`, `repair_type`, `title`, `description`, `repair_address`, `contact_phone`, `urgency_level`, `status`, `assign_to`, `assign_time`, `complete_time`, `satisfaction`, `resident_id`, `location`, `priority`, `create_by`, `create_time`, `update_by`, `update_time`, `deleted`, `version`) VALUES (13, 'RO20250811180332592308', 9, 5, 2, '门窗门窗门窗门窗', '门窗门窗门窗门窗门窗门窗门窗门窗', '浙江省杭州市临平区塘栖镇超山小区001栋1单元102号', '13567114714', 2, 1, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, '2025-08-11 18:03:32', NULL, '2025-08-11 18:03:32', 0, 1);
INSERT INTO `sc_repair_order` (`id`, `order_no`, `user_id`, `community_id`, `repair_type`, `title`, `description`, `repair_address`, `contact_phone`, `urgency_level`, `status`, `assign_to`, `assign_time`, `complete_time`, `satisfaction`, `resident_id`, `location`, `priority`, `create_by`, `create_time`, `update_by`, `update_time`, `deleted`, `version`) VALUES (14, 'RO20250812135933299141', 32, 12, 4, '空调坏了空调坏了', '空调坏了空调坏了空调坏了空调坏了', '浙江省杭州市临平区临平街道小橘子社区一1栋1单元101号', '18329188129', 1, 2, 32, '2025-08-12 14:00:30', NULL, NULL, NULL, NULL, 2, NULL, '2025-08-12 13:59:33', 32, '2025-08-12 06:00:30', 0, 1);
COMMIT;

-- ----------------------------
-- Table structure for sc_repair_progress
-- ----------------------------
DROP TABLE IF EXISTS `sc_repair_progress`;
CREATE TABLE `sc_repair_progress` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '进度ID',
  `order_id` bigint(20) NOT NULL COMMENT '工单ID',
  `order_no` varchar(50) NOT NULL COMMENT '工单号',
  `progress_type` tinyint(4) NOT NULL COMMENT '进度类型：1-受理，2-分配，3-开始维修，4-完成，5-取消',
  `progress_title` varchar(100) DEFAULT NULL COMMENT '进度标题',
  `progress_content` text COMMENT '进度内容',
  `progress_time` datetime DEFAULT NULL COMMENT '进度发生时间',
  `operator_id` bigint(20) DEFAULT NULL COMMENT '操作人ID',
  `repairman_id` bigint(20) DEFAULT NULL COMMENT '维修人员ID',
  `repairman_name` varchar(50) DEFAULT NULL COMMENT '维修人员姓名',
  `remark` text COMMENT '备注信息',
  `status` tinyint(1) DEFAULT '1' COMMENT '状态：1-正常，0-已删除',
  `sort_order` int(11) DEFAULT '0' COMMENT '排序字段',
  `operator_name` varchar(50) DEFAULT NULL COMMENT '操作人姓名',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`),
  KEY `idx_order_id` (`order_id`),
  KEY `idx_order_no` (`order_no`),
  KEY `idx_create_time` (`create_time`)
) ENGINE=InnoDB AUTO_INCREMENT=63 DEFAULT CHARSET=utf8mb4 COMMENT='维修工单进度记录表';

-- ----------------------------
-- Records of sc_repair_progress
-- ----------------------------
BEGIN;
INSERT INTO `sc_repair_progress` (`id`, `order_id`, `order_no`, `progress_type`, `progress_title`, `progress_content`, `progress_time`, `operator_id`, `repairman_id`, `repairman_name`, `remark`, `status`, `sort_order`, `operator_name`, `create_time`) VALUES (1, 4, 'RO20250714150146334859', 2, NULL, '工单已受理', '2025-07-16 11:39:12', 1, NULL, NULL, NULL, 1, 0, '系统', '2025-07-16 11:39:12');
INSERT INTO `sc_repair_progress` (`id`, `order_id`, `order_no`, `progress_type`, `progress_title`, `progress_content`, `progress_time`, `operator_id`, `repairman_id`, `repairman_name`, `remark`, `status`, `sort_order`, `operator_name`, `create_time`) VALUES (2, 4, 'RO20250714150146334859', 3, NULL, '开始维修', '2025-07-16 11:39:25', 24, NULL, NULL, NULL, 1, 0, '系统', '2025-07-16 11:39:25');
INSERT INTO `sc_repair_progress` (`id`, `order_id`, `order_no`, `progress_type`, `progress_title`, `progress_content`, `progress_time`, `operator_id`, `repairman_id`, `repairman_name`, `remark`, `status`, `sort_order`, `operator_name`, `create_time`) VALUES (3, 3, 'RO202501003', 2, NULL, '工单已受理', '2025-07-17 03:01:39', 6, NULL, NULL, NULL, 1, 0, '系统', '2025-07-17 03:01:39');
INSERT INTO `sc_repair_progress` (`id`, `order_id`, `order_no`, `progress_type`, `progress_title`, `progress_content`, `progress_time`, `operator_id`, `repairman_id`, `repairman_name`, `remark`, `status`, `sort_order`, `operator_name`, `create_time`) VALUES (4, 3, 'RO202501003', 3, NULL, '开始维修', '2025-07-17 03:10:09', 24, NULL, NULL, NULL, 1, 0, '系统', '2025-07-17 03:10:09');
INSERT INTO `sc_repair_progress` (`id`, `order_id`, `order_no`, `progress_type`, `progress_title`, `progress_content`, `progress_time`, `operator_id`, `repairman_id`, `repairman_name`, `remark`, `status`, `sort_order`, `operator_name`, `create_time`) VALUES (6, 2, 'RO202501002', 2, '工单受理', '工单已受理，分配维修师傅：维修人员', '2025-07-17 12:16:14', 1, 1, '维修人员', NULL, 1, 2, '系统用户', '2025-07-17 12:16:14');
INSERT INTO `sc_repair_progress` (`id`, `order_id`, `order_no`, `progress_type`, `progress_title`, `progress_content`, `progress_time`, `operator_id`, `repairman_id`, `repairman_name`, `remark`, `status`, `sort_order`, `operator_name`, `create_time`) VALUES (8, 2, 'RO202501002', 3, '开始维修', '开始维修', '2025-07-17 12:16:37', 1, NULL, NULL, NULL, 1, 4, '系统用户', '2025-07-17 12:16:37');
INSERT INTO `sc_repair_progress` (`id`, `order_id`, `order_no`, `progress_type`, `progress_title`, `progress_content`, `progress_time`, `operator_id`, `repairman_id`, `repairman_name`, `remark`, `status`, `sort_order`, `operator_name`, `create_time`) VALUES (10, 2, 'RO202501002', 4, '维修完成', '工单已完成，备注：维修结果：搞不定问题，我就搞定发出问题的人，业主已被我解决！', '2025-07-17 12:17:35', 1, NULL, NULL, NULL, 1, 6, '系统用户', '2025-07-17 12:17:35');
INSERT INTO `sc_repair_progress` (`id`, `order_id`, `order_no`, `progress_type`, `progress_title`, `progress_content`, `progress_time`, `operator_id`, `repairman_id`, `repairman_name`, `remark`, `status`, `sort_order`, `operator_name`, `create_time`) VALUES (12, 1, 'RO202501001', 5, '工单取消', '工单已取消，备注：取消原因：用户取消', '2025-07-17 12:17:59', 1, NULL, NULL, NULL, 1, 2, '系统用户', '2025-07-17 12:17:59');
INSERT INTO `sc_repair_progress` (`id`, `order_id`, `order_no`, `progress_type`, `progress_title`, `progress_content`, `progress_time`, `operator_id`, `repairman_id`, `repairman_name`, `remark`, `status`, `sort_order`, `operator_name`, `create_time`) VALUES (13, 5, 'RO20250717122104866840', 1, '工单创建', '工单已创建，等待受理', '2025-07-17 12:21:04', 1, NULL, NULL, NULL, 1, 1, '系统用户', '2025-07-17 12:21:04');
INSERT INTO `sc_repair_progress` (`id`, `order_id`, `order_no`, `progress_type`, `progress_title`, `progress_content`, `progress_time`, `operator_id`, `repairman_id`, `repairman_name`, `remark`, `status`, `sort_order`, `operator_name`, `create_time`) VALUES (15, 5, 'RO20250717122104866840', 2, '工单受理', '工单已受理，分配维修师傅：维修人员', '2025-07-17 12:21:21', 1, 1, '维修人员', NULL, 1, 3, '系统用户', '2025-07-17 12:21:21');
INSERT INTO `sc_repair_progress` (`id`, `order_id`, `order_no`, `progress_type`, `progress_title`, `progress_content`, `progress_time`, `operator_id`, `repairman_id`, `repairman_name`, `remark`, `status`, `sort_order`, `operator_name`, `create_time`) VALUES (17, 5, 'RO20250717122104866840', 3, '开始维修', '开始维修', '2025-07-17 12:21:23', 1, NULL, NULL, NULL, 1, 5, '系统用户', '2025-07-17 12:21:23');
INSERT INTO `sc_repair_progress` (`id`, `order_id`, `order_no`, `progress_type`, `progress_title`, `progress_content`, `progress_time`, `operator_id`, `repairman_id`, `repairman_name`, `remark`, `status`, `sort_order`, `operator_name`, `create_time`) VALUES (19, 5, 'RO20250717122104866840', 4, '维修完成', '工单已完成，备注：维修结果：修理完毕，重新换了个新空调！', '2025-07-17 12:29:39', 1, NULL, NULL, NULL, 1, 5, '系统用户', '2025-07-17 12:29:39');
INSERT INTO `sc_repair_progress` (`id`, `order_id`, `order_no`, `progress_type`, `progress_title`, `progress_content`, `progress_time`, `operator_id`, `repairman_id`, `repairman_name`, `remark`, `status`, `sort_order`, `operator_name`, `create_time`) VALUES (20, 6, 'RO20250717123041492791', 1, '工单创建', '工单已创建，等待受理', '2025-07-17 12:30:42', 1, NULL, NULL, NULL, 1, 1, '系统用户', '2025-07-17 12:30:42');
INSERT INTO `sc_repair_progress` (`id`, `order_id`, `order_no`, `progress_type`, `progress_title`, `progress_content`, `progress_time`, `operator_id`, `repairman_id`, `repairman_name`, `remark`, `status`, `sort_order`, `operator_name`, `create_time`) VALUES (22, 6, 'RO20250717123041492791', 2, '工单受理', '工单已受理，分配维修师傅：维修人员', '2025-07-17 12:31:04', 1, 1, '维修人员', NULL, 1, 3, '系统用户', '2025-07-17 12:31:04');
INSERT INTO `sc_repair_progress` (`id`, `order_id`, `order_no`, `progress_type`, `progress_title`, `progress_content`, `progress_time`, `operator_id`, `repairman_id`, `repairman_name`, `remark`, `status`, `sort_order`, `operator_name`, `create_time`) VALUES (24, 6, 'RO20250717123041492791', 3, '开始维修', '开始维修', '2025-07-17 13:14:28', 1, NULL, NULL, NULL, 1, 5, '系统用户', '2025-07-17 13:14:28');
INSERT INTO `sc_repair_progress` (`id`, `order_id`, `order_no`, `progress_type`, `progress_title`, `progress_content`, `progress_time`, `operator_id`, `repairman_id`, `repairman_name`, `remark`, `status`, `sort_order`, `operator_name`, `create_time`) VALUES (26, 6, 'RO20250717123041492791', 4, '维修完成', '工单已完成，备注：维修结果：RO20250717123041492791 ok', '2025-07-17 13:14:57', 1, NULL, NULL, NULL, 1, 7, '系统用户', '2025-07-17 13:14:57');
INSERT INTO `sc_repair_progress` (`id`, `order_id`, `order_no`, `progress_type`, `progress_title`, `progress_content`, `progress_time`, `operator_id`, `repairman_id`, `repairman_name`, `remark`, `status`, `sort_order`, `operator_name`, `create_time`) VALUES (28, 3, 'RO202501003', 4, '维修完成', '工单已完成，备注：维修结果：RO202501003', '2025-07-17 13:16:22', 9, NULL, NULL, NULL, 1, 4, '系统用户', '2025-07-17 13:16:22');
INSERT INTO `sc_repair_progress` (`id`, `order_id`, `order_no`, `progress_type`, `progress_title`, `progress_content`, `progress_time`, `operator_id`, `repairman_id`, `repairman_name`, `remark`, `status`, `sort_order`, `operator_name`, `create_time`) VALUES (29, 7, 'RO20250717131734531849', 1, '工单创建', '工单已创建，等待受理', '2025-07-17 13:17:35', 9, NULL, NULL, NULL, 1, 1, '系统用户', '2025-07-17 13:17:35');
INSERT INTO `sc_repair_progress` (`id`, `order_id`, `order_no`, `progress_type`, `progress_title`, `progress_content`, `progress_time`, `operator_id`, `repairman_id`, `repairman_name`, `remark`, `status`, `sort_order`, `operator_name`, `create_time`) VALUES (31, 7, 'RO20250717131734531849', 2, '工单受理', '工单已受理，分配维修师傅：测试用户2-已编辑', '2025-07-17 13:17:47', 9, 6, '测试用户2-已编辑', NULL, 1, 3, '系统用户', '2025-07-17 13:17:47');
INSERT INTO `sc_repair_progress` (`id`, `order_id`, `order_no`, `progress_type`, `progress_title`, `progress_content`, `progress_time`, `operator_id`, `repairman_id`, `repairman_name`, `remark`, `status`, `sort_order`, `operator_name`, `create_time`) VALUES (33, 7, 'RO20250717131734531849', 3, '开始维修', '开始维修', '2025-07-17 13:18:13', 9, NULL, NULL, NULL, 1, 5, '系统用户', '2025-07-17 13:18:13');
INSERT INTO `sc_repair_progress` (`id`, `order_id`, `order_no`, `progress_type`, `progress_title`, `progress_content`, `progress_time`, `operator_id`, `repairman_id`, `repairman_name`, `remark`, `status`, `sort_order`, `operator_name`, `create_time`) VALUES (35, 7, 'RO20250717131734531849', 4, '维修完成', '工单已完成，备注：维修结果：RO20250717131734531849', '2025-07-17 13:18:24', 9, NULL, NULL, NULL, 1, 7, '系统用户', '2025-07-17 13:18:24');
INSERT INTO `sc_repair_progress` (`id`, `order_id`, `order_no`, `progress_type`, `progress_title`, `progress_content`, `progress_time`, `operator_id`, `repairman_id`, `repairman_name`, `remark`, `status`, `sort_order`, `operator_name`, `create_time`) VALUES (37, 4, 'RO20250714150146334859', 4, '维修完成', '工单已完成，备注：维修结果：RO20250714150146334859', '2025-07-17 13:25:17', 9, NULL, NULL, NULL, 1, 4, '系统用户', '2025-07-17 13:25:17');
INSERT INTO `sc_repair_progress` (`id`, `order_id`, `order_no`, `progress_type`, `progress_title`, `progress_content`, `progress_time`, `operator_id`, `repairman_id`, `repairman_name`, `remark`, `status`, `sort_order`, `operator_name`, `create_time`) VALUES (38, 8, 'RO20250717133859258057', 1, '工单创建', '工单已创建，等待受理', '2025-07-17 13:38:59', 9, NULL, NULL, NULL, 1, 1, '系统用户', '2025-07-17 13:38:59');
INSERT INTO `sc_repair_progress` (`id`, `order_id`, `order_no`, `progress_type`, `progress_title`, `progress_content`, `progress_time`, `operator_id`, `repairman_id`, `repairman_name`, `remark`, `status`, `sort_order`, `operator_name`, `create_time`) VALUES (40, 8, 'RO20250717133859258057', 2, '工单受理', '工单已受理，分配维修师傅：测试用户3-已编辑', '2025-07-17 13:39:23', 9, 7, '测试用户3-已编辑', NULL, 1, 3, '系统用户', '2025-07-17 13:39:23');
INSERT INTO `sc_repair_progress` (`id`, `order_id`, `order_no`, `progress_type`, `progress_title`, `progress_content`, `progress_time`, `operator_id`, `repairman_id`, `repairman_name`, `remark`, `status`, `sort_order`, `operator_name`, `create_time`) VALUES (41, 8, 'RO20250717133859258057', 2, '分配备注', '18329188884', '2025-07-17 13:39:24', 9, NULL, NULL, NULL, 1, 4, '系统用户', '2025-07-17 13:39:24');
INSERT INTO `sc_repair_progress` (`id`, `order_id`, `order_no`, `progress_type`, `progress_title`, `progress_content`, `progress_time`, `operator_id`, `repairman_id`, `repairman_name`, `remark`, `status`, `sort_order`, `operator_name`, `create_time`) VALUES (42, 8, 'RO20250717133859258057', 2, '状态更新', '工单状态已更新，备注：18329188884', '2025-07-17 13:39:24', 9, NULL, NULL, NULL, 1, 5, '系统用户', '2025-07-17 13:39:24');
INSERT INTO `sc_repair_progress` (`id`, `order_id`, `order_no`, `progress_type`, `progress_title`, `progress_content`, `progress_time`, `operator_id`, `repairman_id`, `repairman_name`, `remark`, `status`, `sort_order`, `operator_name`, `create_time`) VALUES (44, 8, 'RO20250717133859258057', 3, '开始维修', '开始维修', '2025-07-17 13:40:59', 9, NULL, NULL, NULL, 1, 7, '系统用户', '2025-07-17 13:40:59');
INSERT INTO `sc_repair_progress` (`id`, `order_id`, `order_no`, `progress_type`, `progress_title`, `progress_content`, `progress_time`, `operator_id`, `repairman_id`, `repairman_name`, `remark`, `status`, `sort_order`, `operator_name`, `create_time`) VALUES (46, 8, 'RO20250717133859258057', 4, '维修完成', '工单已完成', '2025-07-17 13:43:22', 9, 7, '测试用户3-已编辑', NULL, 1, 9, '系统用户', '2025-07-17 13:43:22');
INSERT INTO `sc_repair_progress` (`id`, `order_id`, `order_no`, `progress_type`, `progress_title`, `progress_content`, `progress_time`, `operator_id`, `repairman_id`, `repairman_name`, `remark`, `status`, `sort_order`, `operator_name`, `create_time`) VALUES (47, 8, 'RO20250717133859258057', 4, '维修完成', '工单已完成，备注：维修结果：已经维修完成！电梯可以正常运行了！；备注：已经维修完成', '2025-07-17 13:43:22', 9, NULL, NULL, NULL, 1, 10, '系统用户', '2025-07-17 13:43:22');
INSERT INTO `sc_repair_progress` (`id`, `order_id`, `order_no`, `progress_type`, `progress_title`, `progress_content`, `progress_time`, `operator_id`, `repairman_id`, `repairman_name`, `remark`, `status`, `sort_order`, `operator_name`, `create_time`) VALUES (48, 9, 'RO20250717135629403071', 1, '工单创建', '工单已创建，等待受理', '2025-07-17 13:56:30', 9, NULL, NULL, NULL, 1, 1, '系统用户', '2025-07-17 13:56:30');
INSERT INTO `sc_repair_progress` (`id`, `order_id`, `order_no`, `progress_type`, `progress_title`, `progress_content`, `progress_time`, `operator_id`, `repairman_id`, `repairman_name`, `remark`, `status`, `sort_order`, `operator_name`, `create_time`) VALUES (50, 9, 'RO20250717135629403071', 2, '工单受理', '工单已受理，分配维修师傅：智慧物业管理员，备注：电梯坏了', '2025-07-17 13:56:41', 9, 9, '智慧物业管理员', NULL, 1, 3, '系统用户', '2025-07-17 13:56:41');
INSERT INTO `sc_repair_progress` (`id`, `order_id`, `order_no`, `progress_type`, `progress_title`, `progress_content`, `progress_time`, `operator_id`, `repairman_id`, `repairman_name`, `remark`, `status`, `sort_order`, `operator_name`, `create_time`) VALUES (51, 9, 'RO20250717135629403071', 2, '状态更新', '工单状态已更新，备注：电梯坏了', '2025-07-17 13:56:41', 9, NULL, NULL, NULL, 1, 4, '系统用户', '2025-07-17 13:56:41');
INSERT INTO `sc_repair_progress` (`id`, `order_id`, `order_no`, `progress_type`, `progress_title`, `progress_content`, `progress_time`, `operator_id`, `repairman_id`, `repairman_name`, `remark`, `status`, `sort_order`, `operator_name`, `create_time`) VALUES (52, 9, 'RO20250717135629403071', 3, '开始维修', '开始维修', '2025-07-17 14:01:08', 9, NULL, NULL, NULL, 1, 4, '系统用户', '2025-07-17 14:01:08');
INSERT INTO `sc_repair_progress` (`id`, `order_id`, `order_no`, `progress_type`, `progress_title`, `progress_content`, `progress_time`, `operator_id`, `repairman_id`, `repairman_name`, `remark`, `status`, `sort_order`, `operator_name`, `create_time`) VALUES (53, 9, 'RO20250717135629403071', 4, '维修完成', '工单已完成，维修结果：-- ========================================\n-- 删除维修工单触发器SQL脚本\n-- 作者: Wu.Liang\n-- 日期: 2025-01-30\n-- 说明: 删除维修工单相关的数据库触发器，避免重复创建进度记录\n-- ========================================\n\n-- 1. 删除维修工单状态变更触发器\nDROP TRIGGER IF EXISTS `tr_repair_order_status_change`;\n\n-- 2. 删除维修工单创建进度触发器（如果存在）\nDROP TRIGGER IF EXISTS `tr_repair_order_create_progress`;\n\n-- 3. 验证触发器已删除\nSELECT \n    TRIGGER_NAME,\n    EVENT_MANIPULATION,\n    EVENT_OBJECT_TABLE\nFROM information_schema.TRIGGERS \nWHERE EVENT_OBJECT_SCHEMA = DATABASE() \nA，备注：-- ========================================\n-- 删除维修工单触发器SQL脚本\n-- 作者: Wu.Liang\n-- 日期: 2025-01-30\n-- 说明: 删除维修工单相关的数据库触发器，避免重复创建进度记录\n-- ========================================\n\n-- 1. 删除维修工单状态变更触发器\nDROP ', '2025-07-17 14:01:20', 9, 9, '智慧物业管理员', NULL, 1, 5, '系统用户', '2025-07-17 14:01:20');
INSERT INTO `sc_repair_progress` (`id`, `order_id`, `order_no`, `progress_type`, `progress_title`, `progress_content`, `progress_time`, `operator_id`, `repairman_id`, `repairman_name`, `remark`, `status`, `sort_order`, `operator_name`, `create_time`) VALUES (54, 10, 'RO20250728114013143934', 1, '工单创建', '工单已创建，等待受理', '2025-07-28 11:40:14', 9, NULL, NULL, NULL, 1, 1, '系统用户', '2025-07-28 11:40:14');
INSERT INTO `sc_repair_progress` (`id`, `order_id`, `order_no`, `progress_type`, `progress_title`, `progress_content`, `progress_time`, `operator_id`, `repairman_id`, `repairman_name`, `remark`, `status`, `sort_order`, `operator_name`, `create_time`) VALUES (55, 10, 'RO20250728114013143934', 2, '工单受理', '工单已受理，分配维修师傅：gufeiya4，备注：水电维修', '2025-07-28 11:40:48', 9, 30, 'gufeiya4', NULL, 1, 2, '系统用户', '2025-07-28 11:40:48');
INSERT INTO `sc_repair_progress` (`id`, `order_id`, `order_no`, `progress_type`, `progress_title`, `progress_content`, `progress_time`, `operator_id`, `repairman_id`, `repairman_name`, `remark`, `status`, `sort_order`, `operator_name`, `create_time`) VALUES (56, 10, 'RO20250728114013143934', 2, '状态更新', '工单状态已更新，备注：水电维修', '2025-07-28 11:40:48', 9, NULL, NULL, NULL, 1, 3, '系统用户', '2025-07-28 11:40:48');
INSERT INTO `sc_repair_progress` (`id`, `order_id`, `order_no`, `progress_type`, `progress_title`, `progress_content`, `progress_time`, `operator_id`, `repairman_id`, `repairman_name`, `remark`, `status`, `sort_order`, `operator_name`, `create_time`) VALUES (57, 10, 'RO20250728114013143934', 3, '开始维修', '开始维修', '2025-07-28 11:45:36', 9, NULL, NULL, NULL, 1, 4, '系统用户', '2025-07-28 11:45:36');
INSERT INTO `sc_repair_progress` (`id`, `order_id`, `order_no`, `progress_type`, `progress_title`, `progress_content`, `progress_time`, `operator_id`, `repairman_id`, `repairman_name`, `remark`, `status`, `sort_order`, `operator_name`, `create_time`) VALUES (58, 11, 'RO20250808150906755493', 1, '工单创建', '工单已创建，等待受理', '2025-08-08 15:09:06', 9, NULL, NULL, NULL, 1, 1, '系统用户', '2025-08-08 15:09:07');
INSERT INTO `sc_repair_progress` (`id`, `order_id`, `order_no`, `progress_type`, `progress_title`, `progress_content`, `progress_time`, `operator_id`, `repairman_id`, `repairman_name`, `remark`, `status`, `sort_order`, `operator_name`, `create_time`) VALUES (59, 12, 'RO20250811171820713731', 1, '工单创建', '工单已创建，等待受理', '2025-08-11 17:18:21', 9, NULL, NULL, NULL, 1, 1, '系统用户', '2025-08-11 17:18:21');
INSERT INTO `sc_repair_progress` (`id`, `order_id`, `order_no`, `progress_type`, `progress_title`, `progress_content`, `progress_time`, `operator_id`, `repairman_id`, `repairman_name`, `remark`, `status`, `sort_order`, `operator_name`, `create_time`) VALUES (60, 13, 'RO20250811180332592308', 1, '工单创建', '工单已创建，等待受理', '2025-08-11 18:03:32', 9, NULL, NULL, NULL, 1, 1, '系统用户', '2025-08-11 18:03:32');
INSERT INTO `sc_repair_progress` (`id`, `order_id`, `order_no`, `progress_type`, `progress_title`, `progress_content`, `progress_time`, `operator_id`, `repairman_id`, `repairman_name`, `remark`, `status`, `sort_order`, `operator_name`, `create_time`) VALUES (61, 14, 'RO20250812135933299141', 1, '工单创建', '工单已创建，等待受理', '2025-08-12 13:59:33', 32, NULL, NULL, NULL, 1, 1, '系统用户', '2025-08-12 13:59:33');
INSERT INTO `sc_repair_progress` (`id`, `order_id`, `order_no`, `progress_type`, `progress_title`, `progress_content`, `progress_time`, `operator_id`, `repairman_id`, `repairman_name`, `remark`, `status`, `sort_order`, `operator_name`, `create_time`) VALUES (62, 14, 'RO20250812135933299141', 2, '工单受理', '工单已受理，分配维修师傅：小呱呱', '2025-08-12 14:00:30', 32, 32, '小呱呱', NULL, 1, 2, '系统用户', '2025-08-12 14:00:30');
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
